<template>
<view>
    <web-view :src="allUrl"></web-view>
    <s-empty v-if="!allUrl||allUrl=='null'"></s-empty>
</view>
</template>

<script>
export default {
    name: "pdf",
    data() {
        return {
            allUrl:''
        }
    },
    onLoad(params) {
        console.log("params", params);
        this.allUrl=params.url
/*        uni.downloadFile({
            url: this.allUrl,
            success: function(res) {
                console.log(res)
                uni.hideLoading()
                var filePath = res.tempFilePath
                uni.showLoading({
                    title: '正在打开',
                    mask: true,
                })
                wx.openDocument({
                    filePath: filePath,
                    fileType: 'pdf',
                    success: function(res) {
                        console.log(res)
                        uni.hideLoading()
                        console.log('打开文档成功')
                    },
                    fail: function(err) {
                        uni.hideLoading()
                        console.log('fail:' + JSON.stringify(err))
                    },
                })
            },
            fail: function(err) {
                uni.hideLoading()
                console.log('fail:' + JSON.stringify(err))
            },
        })*/
    },
}
</script>

<style scoped lang="scss">

</style>
